\hypertarget{class_client_1_1_network}{\section{Client.\-Network Class Reference}
\label{class_client_1_1_network}\index{Client.\-Network@{Client.\-Network}}
}


Håndtere en forbinelse til en server.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_client_1_1_network_a7be4f44fe2207703b4f3ebf7091ea6af}{Network} (\hyperlink{class_client_1_1_event_driven_share}{Event\-Driven\-Share} E\-D\-S\-In, \hyperlink{class_client_1_1_main_window}{Main\-Window} Gui\-In)
\begin{DoxyCompactList}\small\item\em Constructor \end{DoxyCompactList}\item 
bool \hyperlink{class_client_1_1_network_a39622d8a73f1fe9b727633b30355efd1}{Try\-Connect} (I\-P\-Address ip, int port, \hyperlink{class_s_w2_a311___lib_1_1_user}{User} user)
\begin{DoxyCompactList}\small\item\em Prøver og forbinde til server med det specificeret information \end{DoxyCompactList}\item 
void \hyperlink{class_client_1_1_network_a6784c5862fd1e797567e3d69e0f7f287}{Disconnect} ()
\begin{DoxyCompactList}\small\item\em Diconnecter fra server \end{DoxyCompactList}\item 
void \hyperlink{class_client_1_1_network_a4b72acdb7fab91cabe2f3efed0ccef21}{Client\-Recv} ()
\begin{DoxyCompactList}\small\item\em Start punkt for tråd. Modtager data fra den forbundne forbindelse. Tråden stopper hvis der sker en I\-O\-Exception \end{DoxyCompactList}\item 
void \hyperlink{class_client_1_1_network_aa926c815701cd6d5e26345b5b17f0449}{client\-Send} (object sender, \hyperlink{class_client_1_1_event_driven_share_1_1_encapsulation_args}{Event\-Driven\-Share.\-Encapsulation\-Args} e)
\begin{DoxyCompactList}\small\item\em Reagere på et event. Sender data til forbundne server. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class_client_1_1_network_aef9da7f590d7e1e3247d2cbbe78704cc}{Distributed\-Data} (byte\mbox{[}$\,$\mbox{]} byte\-Array)
\begin{DoxyCompactList}\small\item\em Videre sender via den givne \hyperlink{class_client_1_1_event_driven_share}{Event\-Driven\-Share} \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_s_w2_a311___lib_1_1_object_to_byte_array}{Object\-To\-Byte\-Array} \hyperlink{class_client_1_1_network_a257864d167f941f1a1b4059c08516106}{serializer} = new \hyperlink{class_s_w2_a311___lib_1_1_object_to_byte_array}{Object\-To\-Byte\-Array}()
\item 
Network\-Stream \hyperlink{class_client_1_1_network_af1343acdbb5b3da0dc417d80784e7d5e}{stream}
\item 
\hyperlink{class_client_1_1_event_driven_share}{Event\-Driven\-Share} \hyperlink{class_client_1_1_network_a7c84a16bef1b9a84da87de0ef4cc1e58}{E\-D\-S}
\item 
\hyperlink{class_client_1_1_main_window}{Main\-Window} \hyperlink{class_client_1_1_network_a20bc8c9910dea5a23b6ea1b26bd31d53}{G\-U\-I}
\item 
byte\mbox{[}$\,$\mbox{]} \hyperlink{class_client_1_1_network_a6e4154b7c96f479362c23150cb27e7f8}{bytes}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Håndtere en forbinelse til en server. 



Definition at line 15 of file Network.\-cs.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_client_1_1_network_a7be4f44fe2207703b4f3ebf7091ea6af}{\index{Client\-::\-Network@{Client\-::\-Network}!Network@{Network}}
\index{Network@{Network}!Client::Network@{Client\-::\-Network}}
\subsubsection[{Network}]{\setlength{\rightskip}{0pt plus 5cm}Client.\-Network.\-Network (
\begin{DoxyParamCaption}
\item[{{\bf Event\-Driven\-Share}}]{E\-D\-S\-In, }
\item[{{\bf Main\-Window}}]{Gui\-In}
\end{DoxyParamCaption}
)}}\label{class_client_1_1_network_a7be4f44fe2207703b4f3ebf7091ea6af}


Constructor 


\begin{DoxyParams}{Parameters}
{\em E\-D\-S\-In} & \hyperlink{class_client_1_1_event_driven_share}{Event\-Driven\-Share}, der håndtere in-\//out-\/put\\
\hline
{\em Gui\-In} & \hyperlink{class_client_1_1_main_window}{Main\-Window} der bruges til at prompte forbindelses status. Forventes at en delegate der hedder Delegate\-Connect\-Status til at modtage kaldet\\
\hline
\end{DoxyParams}


Definition at line 31 of file Network.\-cs.



\subsection{Member Function Documentation}
\hypertarget{class_client_1_1_network_a4b72acdb7fab91cabe2f3efed0ccef21}{\index{Client\-::\-Network@{Client\-::\-Network}!Client\-Recv@{Client\-Recv}}
\index{Client\-Recv@{Client\-Recv}!Client::Network@{Client\-::\-Network}}
\subsubsection[{Client\-Recv}]{\setlength{\rightskip}{0pt plus 5cm}void Client.\-Network.\-Client\-Recv (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_client_1_1_network_a4b72acdb7fab91cabe2f3efed0ccef21}


Start punkt for tråd. Modtager data fra den forbundne forbindelse. Tråden stopper hvis der sker en I\-O\-Exception 



Definition at line 81 of file Network.\-cs.

\hypertarget{class_client_1_1_network_aa926c815701cd6d5e26345b5b17f0449}{\index{Client\-::\-Network@{Client\-::\-Network}!client\-Send@{client\-Send}}
\index{client\-Send@{client\-Send}!Client::Network@{Client\-::\-Network}}
\subsubsection[{client\-Send}]{\setlength{\rightskip}{0pt plus 5cm}void Client.\-Network.\-client\-Send (
\begin{DoxyParamCaption}
\item[{object}]{sender, }
\item[{{\bf Event\-Driven\-Share.\-Encapsulation\-Args}}]{e}
\end{DoxyParamCaption}
)}}\label{class_client_1_1_network_aa926c815701cd6d5e26345b5b17f0449}


Reagere på et event. Sender data til forbundne server. 


\begin{DoxyParams}{Parameters}
{\em sender} & Eventets oprindelse\\
\hline
{\em e} & \hyperlink{class_client_1_1_event_driven_share_1_1_encapsulation_args}{Event\-Driven\-Share.\-Encapsulation\-Args} information om eventet. Det er det der bliver sendt\\
\hline
\end{DoxyParams}


Definition at line 128 of file Network.\-cs.

\hypertarget{class_client_1_1_network_a6784c5862fd1e797567e3d69e0f7f287}{\index{Client\-::\-Network@{Client\-::\-Network}!Disconnect@{Disconnect}}
\index{Disconnect@{Disconnect}!Client::Network@{Client\-::\-Network}}
\subsubsection[{Disconnect}]{\setlength{\rightskip}{0pt plus 5cm}void Client.\-Network.\-Disconnect (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_client_1_1_network_a6784c5862fd1e797567e3d69e0f7f287}


Diconnecter fra server 



Definition at line 70 of file Network.\-cs.

\hypertarget{class_client_1_1_network_aef9da7f590d7e1e3247d2cbbe78704cc}{\index{Client\-::\-Network@{Client\-::\-Network}!Distributed\-Data@{Distributed\-Data}}
\index{Distributed\-Data@{Distributed\-Data}!Client::Network@{Client\-::\-Network}}
\subsubsection[{Distributed\-Data}]{\setlength{\rightskip}{0pt plus 5cm}void Client.\-Network.\-Distributed\-Data (
\begin{DoxyParamCaption}
\item[{byte\mbox{[}$\,$\mbox{]}}]{byte\-Array}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{class_client_1_1_network_aef9da7f590d7e1e3247d2cbbe78704cc}


Videre sender via den givne \hyperlink{class_client_1_1_event_driven_share}{Event\-Driven\-Share} 


\begin{DoxyParams}{Parameters}
{\em byte\-Array} & Data der skal håndteres. Forventes at være en Encapsulation\-Class, hvis ikke bliver der kastet en Serialization\-Exception.\\
\hline
\end{DoxyParams}


Definition at line 138 of file Network.\-cs.

\hypertarget{class_client_1_1_network_a39622d8a73f1fe9b727633b30355efd1}{\index{Client\-::\-Network@{Client\-::\-Network}!Try\-Connect@{Try\-Connect}}
\index{Try\-Connect@{Try\-Connect}!Client::Network@{Client\-::\-Network}}
\subsubsection[{Try\-Connect}]{\setlength{\rightskip}{0pt plus 5cm}bool Client.\-Network.\-Try\-Connect (
\begin{DoxyParamCaption}
\item[{I\-P\-Address}]{ip, }
\item[{int}]{port, }
\item[{{\bf User}}]{user}
\end{DoxyParamCaption}
)}}\label{class_client_1_1_network_a39622d8a73f1fe9b727633b30355efd1}


Prøver og forbinde til server med det specificeret information 


\begin{DoxyParams}{Parameters}
{\em ip} & ipaddresse der skal forbindes til\\
\hline
{\em port} & port på server der skal forbindes til\\
\hline
{\em user} & User som bruger at forbinde\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
returns true hvis forbindelsen blev oprettet succefuldt, ellers false
\end{DoxyReturn}


Definition at line 46 of file Network.\-cs.



\subsection{Member Data Documentation}
\hypertarget{class_client_1_1_network_a6e4154b7c96f479362c23150cb27e7f8}{\index{Client\-::\-Network@{Client\-::\-Network}!bytes@{bytes}}
\index{bytes@{bytes}!Client::Network@{Client\-::\-Network}}
\subsubsection[{bytes}]{\setlength{\rightskip}{0pt plus 5cm}byte \mbox{[}$\,$\mbox{]} Client.\-Network.\-bytes\hspace{0.3cm}{\ttfamily [private]}}}\label{class_client_1_1_network_a6e4154b7c96f479362c23150cb27e7f8}


Definition at line 22 of file Network.\-cs.

\hypertarget{class_client_1_1_network_a7c84a16bef1b9a84da87de0ef4cc1e58}{\index{Client\-::\-Network@{Client\-::\-Network}!E\-D\-S@{E\-D\-S}}
\index{E\-D\-S@{E\-D\-S}!Client::Network@{Client\-::\-Network}}
\subsubsection[{E\-D\-S}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Event\-Driven\-Share} Client.\-Network.\-E\-D\-S\hspace{0.3cm}{\ttfamily [private]}}}\label{class_client_1_1_network_a7c84a16bef1b9a84da87de0ef4cc1e58}


Definition at line 20 of file Network.\-cs.

\hypertarget{class_client_1_1_network_a20bc8c9910dea5a23b6ea1b26bd31d53}{\index{Client\-::\-Network@{Client\-::\-Network}!G\-U\-I@{G\-U\-I}}
\index{G\-U\-I@{G\-U\-I}!Client::Network@{Client\-::\-Network}}
\subsubsection[{G\-U\-I}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Main\-Window} Client.\-Network.\-G\-U\-I\hspace{0.3cm}{\ttfamily [private]}}}\label{class_client_1_1_network_a20bc8c9910dea5a23b6ea1b26bd31d53}


Definition at line 21 of file Network.\-cs.

\hypertarget{class_client_1_1_network_a257864d167f941f1a1b4059c08516106}{\index{Client\-::\-Network@{Client\-::\-Network}!serializer@{serializer}}
\index{serializer@{serializer}!Client::Network@{Client\-::\-Network}}
\subsubsection[{serializer}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Object\-To\-Byte\-Array} Client.\-Network.\-serializer = new {\bf Object\-To\-Byte\-Array}()\hspace{0.3cm}{\ttfamily [private]}}}\label{class_client_1_1_network_a257864d167f941f1a1b4059c08516106}


Definition at line 18 of file Network.\-cs.

\hypertarget{class_client_1_1_network_af1343acdbb5b3da0dc417d80784e7d5e}{\index{Client\-::\-Network@{Client\-::\-Network}!stream@{stream}}
\index{stream@{stream}!Client::Network@{Client\-::\-Network}}
\subsubsection[{stream}]{\setlength{\rightskip}{0pt plus 5cm}Network\-Stream Client.\-Network.\-stream\hspace{0.3cm}{\ttfamily [private]}}}\label{class_client_1_1_network_af1343acdbb5b3da0dc417d80784e7d5e}


Definition at line 19 of file Network.\-cs.



The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
Client/\hyperlink{_client_2_network_8cs}{Network.\-cs}\end{DoxyCompactItemize}
